<?php

class HouseStyles extends CActiveRecord
{
  /*
    id  key, each room's id in one house style
    supply_id 供应商id
    description 户型描述
    user_id 输入者id
    inputDate 输入日期
   * BuildName 楼盘名称
   * hTypeId 户型id
   * area 面积(m^2)
   */
 
 /*
   * Returns the static model of the specified AR class.
   * @return CActiveRecord the static model class
   */
  public static function model($className=__CLASS__)
  {
    return parent::model($className);
  }

public function relations()
{

    return array( 
        'RoomStyles'=>array(self::HAS_MANY, 'RoomStyles', 'hs_id','together'=>false),
	      'Supplier'=>array(self::BELONGS_TO, 'Supplier', 'supplier_id'),
	      'BuildingInfos'=>array(self::BELONGS_TO, 'BuildingInfos', 'bi_id')
);
}
  /**
   * @return string the associated database table name
   */
  public function tableName()
  {
    return 'HOUSE_STYLES';
  }
    
  public function primaryKey(){
    return 'id';
  } 
  
  }
  ?>